<?php

namespace app\customer;

use app\consts\Keywords;
use Monolog\Processor\ProcessorInterface;

class LoggerProcessor implements ProcessorInterface
{
    public function __invoke(array $record)
    {
        $record['extra']['request_id'] = request()->{Keywords::REQUEST_ID};
        $record['extra']['lang'] = request()->{Keywords::LANG};
        return $record;
    }
}